/*
 * Chess.h
 *
 *  Created on: 2011-7-30
 *      Author: Administrator
 */

#ifndef CHESS_H_
#define CHESS_H_
#include "Position.h"
#include "SituationProjection.h"
#include "Action.h"
#include <vector>

class Chess {
public:
	Chess();
	virtual ~Chess();
	virtual void GenActions(std::vector<Action>& actions,Position& pos,SituationProjection& projection)=0;
	virtual bool IsRed()=0;
protected:
	virtual bool MoveRuleCheck(Position& srcPos,Position& destPos,SituationProjection& projection)=0;
	bool CanMove(Position& srcPos,Position& destPos,SituationProjection& projection);
	bool IsKillSelf(Position& destPos,SituationProjection& projection);
};

#endif /* CHESS_H_ */
